package com.itheima.demo14_commonsio;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;

import java.io.File;
import java.io.FileOutputStream;
import java.nio.file.Files;
import java.nio.file.Path;

public class CommonsIoDemo1 {
    public static void main(String[] args) throws Exception {
        // 目标：IO框架
        FileUtils.copyFile(new File("high03-file-io\\src\\he01.txt"), new File("high03-file-io\\src\\he02.txt"));

//        //JDK 7提供的
//        Files.copy(Path.of("day03-file-io\\src\\csb_out.txt"), Path.of("day03-file-io\\src\\csb_out3.txt"));
//
//
        // 删除文件夹
        FileUtils.deleteDirectory(new File("R:\\resource\\jjdd"));
//        IOUtils.write("hello", new FileOutputStream("high03-file-io\\src\\he01.txt"));
    }
}
